# 基础镜像使用java
FROM openjdk:8
# 作者
MAINTAINER hippo 971567069@qq.com
## Get Chrome
RUN sh -c 'echo "" > /etc/apt/sources.list'
RUN sh -c 'echo "deb http://mirrors.aliyun.com/debian stable main" >> /etc/apt/sources.list'
RUN sh -c 'echo "deb http://mirrors.aliyun.com/debian buster main" >> /etc/apt/sources.list'
RUN sh -c 'echo "deb http://mirrors.aliyun.com/debian-security buster/updates main" >> /etc/apt/sources.list'
RUN sh -c 'echo "deb http://mirrors.aliyun.com/debian buster-updates main" >> /etc/apt/sources.list'
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update
RUN apt-get install -y google-chrome-stable
# 暴露端口
EXPOSE 8080
# 将jar包添加到容器中并更名为app.jar
ADD './back/target/hippo-1.0.jar' 'app.jar'
# 运行jar包
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java", "-jar", "/app.jar"]